<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">

    <h3>{{ age }}</h3>
    <input type="button" value="简化写法" @click="change_age"></input>
    <input type="button" value="简化写法" @click="add_age"></input>

</div>
<script>
    new Vue({
        el: "#app",
        data: {
            age: 18,
        },
        methods: {
            change_age:function (){
              this.age--;
            },
            add_age:function (){
              this.age++;
            },
        },
    })
</script>
</body>
</html>